
// MIT License
// 
// Copyright (c) 2009-2017 Luca Piccioni
// 
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
// 
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
// 
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.
// 
// This file is automatically generated

#pragma warning disable 649, 1572, 1573

// ReSharper disable RedundantUsingDirective
using System;
using System.Diagnostics;
using System.Runtime.InteropServices;
using System.Security;
using System.Text;

using Khronos;

// ReSharper disable CheckNamespace
// ReSharper disable InconsistentNaming
// ReSharper disable JoinDeclarationAndInitializer

namespace OpenGL
{
	public partial class Gl
	{
		/// <summary>
		/// [GL] Value of GL_MAX_VERTEX_UNITS_ARB symbol.
		/// </summary>
		[RequiredByFeature("GL_ARB_vertex_blend")]
		[RequiredByFeature("GL_OES_matrix_palette", Api = "gles1")]
		public const int MAX_VERTEX_UNITS_ARB = 0x86A4;

		/// <summary>
		/// [GL] Value of GL_ACTIVE_VERTEX_UNITS_ARB symbol.
		/// </summary>
		[RequiredByFeature("GL_ARB_vertex_blend")]
		public const int ACTIVE_VERTEX_UNITS_ARB = 0x86A5;

		/// <summary>
		/// [GL] Value of GL_WEIGHT_SUM_UNITY_ARB symbol.
		/// </summary>
		[RequiredByFeature("GL_ARB_vertex_blend")]
		public const int WEIGHT_SUM_UNITY_ARB = 0x86A6;

		/// <summary>
		/// [GL] Value of GL_VERTEX_BLEND_ARB symbol.
		/// </summary>
		[RequiredByFeature("GL_ARB_vertex_blend")]
		public const int VERTEX_BLEND_ARB = 0x86A7;

		/// <summary>
		/// [GL] Value of GL_CURRENT_WEIGHT_ARB symbol.
		/// </summary>
		[RequiredByFeature("GL_ARB_vertex_blend")]
		public const int CURRENT_WEIGHT_ARB = 0x86A8;

		/// <summary>
		/// [GL] Value of GL_WEIGHT_ARRAY_TYPE_ARB symbol.
		/// </summary>
		[RequiredByFeature("GL_ARB_vertex_blend")]
		[RequiredByFeature("GL_OES_matrix_palette", Api = "gles1")]
		public const int WEIGHT_ARRAY_TYPE_ARB = 0x86A9;

		/// <summary>
		/// [GL] Value of GL_WEIGHT_ARRAY_STRIDE_ARB symbol.
		/// </summary>
		[RequiredByFeature("GL_ARB_vertex_blend")]
		[RequiredByFeature("GL_OES_matrix_palette", Api = "gles1")]
		public const int WEIGHT_ARRAY_STRIDE_ARB = 0x86AA;

		/// <summary>
		/// [GL] Value of GL_WEIGHT_ARRAY_SIZE_ARB symbol.
		/// </summary>
		[RequiredByFeature("GL_ARB_vertex_blend")]
		[RequiredByFeature("GL_OES_matrix_palette", Api = "gles1")]
		public const int WEIGHT_ARRAY_SIZE_ARB = 0x86AB;

		/// <summary>
		/// [GL] Value of GL_WEIGHT_ARRAY_POINTER_ARB symbol.
		/// </summary>
		[RequiredByFeature("GL_ARB_vertex_blend")]
		[RequiredByFeature("GL_OES_matrix_palette", Api = "gles1")]
		public const int WEIGHT_ARRAY_POINTER_ARB = 0x86AC;

		/// <summary>
		/// [GL] Value of GL_WEIGHT_ARRAY_ARB symbol.
		/// </summary>
		[RequiredByFeature("GL_ARB_vertex_blend")]
		[RequiredByFeature("GL_OES_matrix_palette", Api = "gles1")]
		public const int WEIGHT_ARRAY_ARB = 0x86AD;

		/// <summary>
		/// [GL] Value of GL_MODELVIEW0_ARB symbol.
		/// </summary>
		[RequiredByFeature("GL_ARB_vertex_blend")]
		[RequiredByFeature("GL_EXT_vertex_weighting")]
		public const int MODELVIEW0_ARB = 0x1700;

		/// <summary>
		/// [GL] Value of GL_MODELVIEW1_ARB symbol.
		/// </summary>
		[RequiredByFeature("GL_ARB_vertex_blend")]
		[RequiredByFeature("GL_EXT_vertex_weighting")]
		public const int MODELVIEW1_ARB = 0x850A;

		/// <summary>
		/// [GL] Value of GL_MODELVIEW2_ARB symbol.
		/// </summary>
		[RequiredByFeature("GL_ARB_vertex_blend")]
		public const int MODELVIEW2_ARB = 0x8722;

		/// <summary>
		/// [GL] Value of GL_MODELVIEW3_ARB symbol.
		/// </summary>
		[RequiredByFeature("GL_ARB_vertex_blend")]
		public const int MODELVIEW3_ARB = 0x8723;

		/// <summary>
		/// [GL] Value of GL_MODELVIEW4_ARB symbol.
		/// </summary>
		[RequiredByFeature("GL_ARB_vertex_blend")]
		public const int MODELVIEW4_ARB = 0x8724;

		/// <summary>
		/// [GL] Value of GL_MODELVIEW5_ARB symbol.
		/// </summary>
		[RequiredByFeature("GL_ARB_vertex_blend")]
		public const int MODELVIEW5_ARB = 0x8725;

		/// <summary>
		/// [GL] Value of GL_MODELVIEW6_ARB symbol.
		/// </summary>
		[RequiredByFeature("GL_ARB_vertex_blend")]
		public const int MODELVIEW6_ARB = 0x8726;

		/// <summary>
		/// [GL] Value of GL_MODELVIEW7_ARB symbol.
		/// </summary>
		[RequiredByFeature("GL_ARB_vertex_blend")]
		public const int MODELVIEW7_ARB = 0x8727;

		/// <summary>
		/// [GL] Value of GL_MODELVIEW8_ARB symbol.
		/// </summary>
		[RequiredByFeature("GL_ARB_vertex_blend")]
		public const int MODELVIEW8_ARB = 0x8728;

		/// <summary>
		/// [GL] Value of GL_MODELVIEW9_ARB symbol.
		/// </summary>
		[RequiredByFeature("GL_ARB_vertex_blend")]
		public const int MODELVIEW9_ARB = 0x8729;

		/// <summary>
		/// [GL] Value of GL_MODELVIEW10_ARB symbol.
		/// </summary>
		[RequiredByFeature("GL_ARB_vertex_blend")]
		public const int MODELVIEW10_ARB = 0x872A;

		/// <summary>
		/// [GL] Value of GL_MODELVIEW11_ARB symbol.
		/// </summary>
		[RequiredByFeature("GL_ARB_vertex_blend")]
		public const int MODELVIEW11_ARB = 0x872B;

		/// <summary>
		/// [GL] Value of GL_MODELVIEW12_ARB symbol.
		/// </summary>
		[RequiredByFeature("GL_ARB_vertex_blend")]
		public const int MODELVIEW12_ARB = 0x872C;

		/// <summary>
		/// [GL] Value of GL_MODELVIEW13_ARB symbol.
		/// </summary>
		[RequiredByFeature("GL_ARB_vertex_blend")]
		public const int MODELVIEW13_ARB = 0x872D;

		/// <summary>
		/// [GL] Value of GL_MODELVIEW14_ARB symbol.
		/// </summary>
		[RequiredByFeature("GL_ARB_vertex_blend")]
		public const int MODELVIEW14_ARB = 0x872E;

		/// <summary>
		/// [GL] Value of GL_MODELVIEW15_ARB symbol.
		/// </summary>
		[RequiredByFeature("GL_ARB_vertex_blend")]
		public const int MODELVIEW15_ARB = 0x872F;

		/// <summary>
		/// [GL] Value of GL_MODELVIEW16_ARB symbol.
		/// </summary>
		[RequiredByFeature("GL_ARB_vertex_blend")]
		public const int MODELVIEW16_ARB = 0x8730;

		/// <summary>
		/// [GL] Value of GL_MODELVIEW17_ARB symbol.
		/// </summary>
		[RequiredByFeature("GL_ARB_vertex_blend")]
		public const int MODELVIEW17_ARB = 0x8731;

		/// <summary>
		/// [GL] Value of GL_MODELVIEW18_ARB symbol.
		/// </summary>
		[RequiredByFeature("GL_ARB_vertex_blend")]
		public const int MODELVIEW18_ARB = 0x8732;

		/// <summary>
		/// [GL] Value of GL_MODELVIEW19_ARB symbol.
		/// </summary>
		[RequiredByFeature("GL_ARB_vertex_blend")]
		public const int MODELVIEW19_ARB = 0x8733;

		/// <summary>
		/// [GL] Value of GL_MODELVIEW20_ARB symbol.
		/// </summary>
		[RequiredByFeature("GL_ARB_vertex_blend")]
		public const int MODELVIEW20_ARB = 0x8734;

		/// <summary>
		/// [GL] Value of GL_MODELVIEW21_ARB symbol.
		/// </summary>
		[RequiredByFeature("GL_ARB_vertex_blend")]
		public const int MODELVIEW21_ARB = 0x8735;

		/// <summary>
		/// [GL] Value of GL_MODELVIEW22_ARB symbol.
		/// </summary>
		[RequiredByFeature("GL_ARB_vertex_blend")]
		public const int MODELVIEW22_ARB = 0x8736;

		/// <summary>
		/// [GL] Value of GL_MODELVIEW23_ARB symbol.
		/// </summary>
		[RequiredByFeature("GL_ARB_vertex_blend")]
		public const int MODELVIEW23_ARB = 0x8737;

		/// <summary>
		/// [GL] Value of GL_MODELVIEW24_ARB symbol.
		/// </summary>
		[RequiredByFeature("GL_ARB_vertex_blend")]
		public const int MODELVIEW24_ARB = 0x8738;

		/// <summary>
		/// [GL] Value of GL_MODELVIEW25_ARB symbol.
		/// </summary>
		[RequiredByFeature("GL_ARB_vertex_blend")]
		public const int MODELVIEW25_ARB = 0x8739;

		/// <summary>
		/// [GL] Value of GL_MODELVIEW26_ARB symbol.
		/// </summary>
		[RequiredByFeature("GL_ARB_vertex_blend")]
		public const int MODELVIEW26_ARB = 0x873A;

		/// <summary>
		/// [GL] Value of GL_MODELVIEW27_ARB symbol.
		/// </summary>
		[RequiredByFeature("GL_ARB_vertex_blend")]
		public const int MODELVIEW27_ARB = 0x873B;

		/// <summary>
		/// [GL] Value of GL_MODELVIEW28_ARB symbol.
		/// </summary>
		[RequiredByFeature("GL_ARB_vertex_blend")]
		public const int MODELVIEW28_ARB = 0x873C;

		/// <summary>
		/// [GL] Value of GL_MODELVIEW29_ARB symbol.
		/// </summary>
		[RequiredByFeature("GL_ARB_vertex_blend")]
		public const int MODELVIEW29_ARB = 0x873D;

		/// <summary>
		/// [GL] Value of GL_MODELVIEW30_ARB symbol.
		/// </summary>
		[RequiredByFeature("GL_ARB_vertex_blend")]
		public const int MODELVIEW30_ARB = 0x873E;

		/// <summary>
		/// [GL] Value of GL_MODELVIEW31_ARB symbol.
		/// </summary>
		[RequiredByFeature("GL_ARB_vertex_blend")]
		public const int MODELVIEW31_ARB = 0x873F;

		/// <summary>
		/// [GL] glWeightbvARB: Binding for glWeightbvARB.
		/// </summary>
		/// <param name="weights">
		/// A <see cref="T:sbyte[]"/>.
		/// </param>
		[RequiredByFeature("GL_ARB_vertex_blend")]
		public static void WeightARB(sbyte[] weights)
		{
			unsafe {
				fixed (sbyte* p_weights = weights)
				{
					Debug.Assert(Delegates.pglWeightbvARB != null, "pglWeightbvARB not implemented");
					Delegates.pglWeightbvARB(weights.Length, p_weights);
					LogCommand("glWeightbvARB", null, weights.Length, weights					);
				}
			}
			DebugCheckErrors(null);
		}

		/// <summary>
		/// [GL] glWeightsvARB: Binding for glWeightsvARB.
		/// </summary>
		/// <param name="weights">
		/// A <see cref="T:short[]"/>.
		/// </param>
		[RequiredByFeature("GL_ARB_vertex_blend")]
		public static void WeightARB(short[] weights)
		{
			unsafe {
				fixed (short* p_weights = weights)
				{
					Debug.Assert(Delegates.pglWeightsvARB != null, "pglWeightsvARB not implemented");
					Delegates.pglWeightsvARB(weights.Length, p_weights);
					LogCommand("glWeightsvARB", null, weights.Length, weights					);
				}
			}
			DebugCheckErrors(null);
		}

		/// <summary>
		/// [GL] glWeightivARB: Binding for glWeightivARB.
		/// </summary>
		/// <param name="weights">
		/// A <see cref="T:int[]"/>.
		/// </param>
		[RequiredByFeature("GL_ARB_vertex_blend")]
		public static void WeightARB(int[] weights)
		{
			unsafe {
				fixed (int* p_weights = weights)
				{
					Debug.Assert(Delegates.pglWeightivARB != null, "pglWeightivARB not implemented");
					Delegates.pglWeightivARB(weights.Length, p_weights);
					LogCommand("glWeightivARB", null, weights.Length, weights					);
				}
			}
			DebugCheckErrors(null);
		}

		/// <summary>
		/// [GL] glWeightfvARB: Binding for glWeightfvARB.
		/// </summary>
		/// <param name="weights">
		/// A <see cref="T:float[]"/>.
		/// </param>
		[RequiredByFeature("GL_ARB_vertex_blend")]
		public static void WeightARB(float[] weights)
		{
			unsafe {
				fixed (float* p_weights = weights)
				{
					Debug.Assert(Delegates.pglWeightfvARB != null, "pglWeightfvARB not implemented");
					Delegates.pglWeightfvARB(weights.Length, p_weights);
					LogCommand("glWeightfvARB", null, weights.Length, weights					);
				}
			}
			DebugCheckErrors(null);
		}

		/// <summary>
		/// [GL] glWeightdvARB: Binding for glWeightdvARB.
		/// </summary>
		/// <param name="weights">
		/// A <see cref="T:double[]"/>.
		/// </param>
		[RequiredByFeature("GL_ARB_vertex_blend")]
		public static void WeightARB(double[] weights)
		{
			unsafe {
				fixed (double* p_weights = weights)
				{
					Debug.Assert(Delegates.pglWeightdvARB != null, "pglWeightdvARB not implemented");
					Delegates.pglWeightdvARB(weights.Length, p_weights);
					LogCommand("glWeightdvARB", null, weights.Length, weights					);
				}
			}
			DebugCheckErrors(null);
		}

		/// <summary>
		/// [GL] glWeightubvARB: Binding for glWeightubvARB.
		/// </summary>
		/// <param name="weights">
		/// A <see cref="T:byte[]"/>.
		/// </param>
		[RequiredByFeature("GL_ARB_vertex_blend")]
		public static void WeightARB(byte[] weights)
		{
			unsafe {
				fixed (byte* p_weights = weights)
				{
					Debug.Assert(Delegates.pglWeightubvARB != null, "pglWeightubvARB not implemented");
					Delegates.pglWeightubvARB(weights.Length, p_weights);
					LogCommand("glWeightubvARB", null, weights.Length, weights					);
				}
			}
			DebugCheckErrors(null);
		}

		/// <summary>
		/// [GL] glWeightusvARB: Binding for glWeightusvARB.
		/// </summary>
		/// <param name="weights">
		/// A <see cref="T:ushort[]"/>.
		/// </param>
		[RequiredByFeature("GL_ARB_vertex_blend")]
		public static void WeightARB(ushort[] weights)
		{
			unsafe {
				fixed (ushort* p_weights = weights)
				{
					Debug.Assert(Delegates.pglWeightusvARB != null, "pglWeightusvARB not implemented");
					Delegates.pglWeightusvARB(weights.Length, p_weights);
					LogCommand("glWeightusvARB", null, weights.Length, weights					);
				}
			}
			DebugCheckErrors(null);
		}

		/// <summary>
		/// [GL] glWeightuivARB: Binding for glWeightuivARB.
		/// </summary>
		/// <param name="weights">
		/// A <see cref="T:uint[]"/>.
		/// </param>
		[RequiredByFeature("GL_ARB_vertex_blend")]
		public static void WeightARB(uint[] weights)
		{
			unsafe {
				fixed (uint* p_weights = weights)
				{
					Debug.Assert(Delegates.pglWeightuivARB != null, "pglWeightuivARB not implemented");
					Delegates.pglWeightuivARB(weights.Length, p_weights);
					LogCommand("glWeightuivARB", null, weights.Length, weights					);
				}
			}
			DebugCheckErrors(null);
		}

		/// <summary>
		/// [GL] glWeightPointerARB: Binding for glWeightPointerARB.
		/// </summary>
		/// <param name="size">
		/// A <see cref="T:int"/>.
		/// </param>
		/// <param name="type">
		/// A <see cref="T:int"/>.
		/// </param>
		/// <param name="stride">
		/// A <see cref="T:int"/>.
		/// </param>
		/// <param name="pointer">
		/// A <see cref="T:IntPtr"/>.
		/// </param>
		[RequiredByFeature("GL_ARB_vertex_blend")]
		public static void WeightPointerARB(int size, int type, int stride, IntPtr pointer)
		{
			Debug.Assert(Delegates.pglWeightPointerARB != null, "pglWeightPointerARB not implemented");
			Delegates.pglWeightPointerARB(size, type, stride, pointer);
			LogCommand("glWeightPointerARB", null, size, type, stride, pointer			);
			DebugCheckErrors(null);
		}

		/// <summary>
		/// [GL] glWeightPointerARB: Binding for glWeightPointerARB.
		/// </summary>
		/// <param name="size">
		/// A <see cref="T:int"/>.
		/// </param>
		/// <param name="type">
		/// A <see cref="T:int"/>.
		/// </param>
		/// <param name="stride">
		/// A <see cref="T:int"/>.
		/// </param>
		/// <param name="pointer">
		/// A <see cref="T:object"/>.
		/// </param>
		[RequiredByFeature("GL_ARB_vertex_blend")]
		public static void WeightPointerARB(int size, int type, int stride, object pointer)
		{
			GCHandle pin_pointer = GCHandle.Alloc(pointer, GCHandleType.Pinned);
			try {
				WeightPointerARB(size, type, stride, pin_pointer.AddrOfPinnedObject());
			} finally {
				pin_pointer.Free();
			}
		}

		/// <summary>
		/// [GL] glVertexBlendARB: Binding for glVertexBlendARB.
		/// </summary>
		/// <param name="count">
		/// A <see cref="T:int"/>.
		/// </param>
		[RequiredByFeature("GL_ARB_vertex_blend")]
		public static void VertexBlendARB(int count)
		{
			Debug.Assert(Delegates.pglVertexBlendARB != null, "pglVertexBlendARB not implemented");
			Delegates.pglVertexBlendARB(count);
			LogCommand("glVertexBlendARB", null, count			);
			DebugCheckErrors(null);
		}

		internal static unsafe partial class Delegates
		{
			[RequiredByFeature("GL_ARB_vertex_blend")]
			[SuppressUnmanagedCodeSecurity]
			internal delegate void glWeightbvARB(int size, sbyte* weights);

			[RequiredByFeature("GL_ARB_vertex_blend")]
			[ThreadStatic]
			internal static glWeightbvARB pglWeightbvARB;

			[RequiredByFeature("GL_ARB_vertex_blend")]
			[SuppressUnmanagedCodeSecurity]
			internal delegate void glWeightsvARB(int size, short* weights);

			[RequiredByFeature("GL_ARB_vertex_blend")]
			[ThreadStatic]
			internal static glWeightsvARB pglWeightsvARB;

			[RequiredByFeature("GL_ARB_vertex_blend")]
			[SuppressUnmanagedCodeSecurity]
			internal delegate void glWeightivARB(int size, int* weights);

			[RequiredByFeature("GL_ARB_vertex_blend")]
			[ThreadStatic]
			internal static glWeightivARB pglWeightivARB;

			[RequiredByFeature("GL_ARB_vertex_blend")]
			[SuppressUnmanagedCodeSecurity]
			internal delegate void glWeightfvARB(int size, float* weights);

			[RequiredByFeature("GL_ARB_vertex_blend")]
			[ThreadStatic]
			internal static glWeightfvARB pglWeightfvARB;

			[RequiredByFeature("GL_ARB_vertex_blend")]
			[SuppressUnmanagedCodeSecurity]
			internal delegate void glWeightdvARB(int size, double* weights);

			[RequiredByFeature("GL_ARB_vertex_blend")]
			[ThreadStatic]
			internal static glWeightdvARB pglWeightdvARB;

			[RequiredByFeature("GL_ARB_vertex_blend")]
			[SuppressUnmanagedCodeSecurity]
			internal delegate void glWeightubvARB(int size, byte* weights);

			[RequiredByFeature("GL_ARB_vertex_blend")]
			[ThreadStatic]
			internal static glWeightubvARB pglWeightubvARB;

			[RequiredByFeature("GL_ARB_vertex_blend")]
			[SuppressUnmanagedCodeSecurity]
			internal delegate void glWeightusvARB(int size, ushort* weights);

			[RequiredByFeature("GL_ARB_vertex_blend")]
			[ThreadStatic]
			internal static glWeightusvARB pglWeightusvARB;

			[RequiredByFeature("GL_ARB_vertex_blend")]
			[SuppressUnmanagedCodeSecurity]
			internal delegate void glWeightuivARB(int size, uint* weights);

			[RequiredByFeature("GL_ARB_vertex_blend")]
			[ThreadStatic]
			internal static glWeightuivARB pglWeightuivARB;

			[RequiredByFeature("GL_ARB_vertex_blend")]
			[SuppressUnmanagedCodeSecurity]
			internal delegate void glWeightPointerARB(int size, int type, int stride, IntPtr pointer);

			[RequiredByFeature("GL_ARB_vertex_blend")]
			[ThreadStatic]
			internal static glWeightPointerARB pglWeightPointerARB;

			[RequiredByFeature("GL_ARB_vertex_blend")]
			[SuppressUnmanagedCodeSecurity]
			internal delegate void glVertexBlendARB(int count);

			[RequiredByFeature("GL_ARB_vertex_blend")]
			[ThreadStatic]
			internal static glVertexBlendARB pglVertexBlendARB;

		}
	}

}
